"use strict";

const bodyParser = require("body-parser");

const initMiddleware = function(app) {
  // 最多允许2m
  const maxBodySize = 2 * 1024 * 1024;
  app.use(bodyParser.json({ limit: maxBodySize }));
  app.use(bodyParser.urlencoded());
}

module.exports = initMiddleware;
